package 设计模式.行为型模式.策略模式;

/**
 * @author MT
 * @date 2019-11-13 18:25
 */
public class 策略模式 {

    public static void main(String[] args) {
        Context c = new Context();
        Strategy s = new ConcreteStrategyA();
        c.setStrategy(s);
        c.strategyMethod();
        System.out.println("-----------------");
        s = new ConcreteStrategyB();
        c.setStrategy(s);
        c.strategyMethod();
    }
}
